{% extends 'KeioStudyBundle:Theme:layout_backend.html.twig' %}


{% set adm = 0 %}
{% set author = 0 %}
{% set member = 0 %}
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
	{% for user_role in app.user.roles %}
		{% if user_role=='ROLE_ADMIN' %}
			{% set adm = 1 %}
		{% endif %}
		{% if user_role=='ROLE_AUTHOR' %}
			{% set author = 1 %}
		{% endif %}
		{% if user_role=='ROLE_USER' %}
			{% set member = 1 %}
		{% endif %}
	{% endfor %}
{% endif %}

{% block nav_left %}

          <div id="navigation" class="span3">
            <div class="well">
              <h2>Navigation</h2>

              <ul class="menu_main">



	{% include 'KeioStudyBundle::nav_left_public.html.twig' %}

	{% if member==1 %}
		{% include 'KeioStudyBundle::nav_left_hocvien.html.twig' %}
		<hr style="border: 0;
	    height: 0;
    	border-top: 1px solid rgba(0, 0, 0, 0.1);
	    border-bottom: 1px solid rgba(255, 255, 255, 0.3);"/>
	{% endif %}

	{% if author==1 %}
		{% include 'KeioStudyBundle::nav_left_author.html.twig' %}
		<hr style="border: 0;
	    height: 0;
    	border-top: 1px solid rgba(0, 0, 0, 0.1);
	    border-bottom: 1px solid rgba(255, 255, 255, 0.3);"/>
	{% endif %}

	{% if adm==1 %}
		{% include 'KeioStudyBundle::nav_left_adm.html.twig' %}
		<hr style="border: 0;
	    height: 0;
    	border-top: 1px solid rgba(0, 0, 0, 0.1);
	    border-bottom: 1px solid rgba(255, 255, 255, 0.3);"/>
	{% endif %}


              </ul>
            </div>
          </div>

{% endblock %}